import { createNamespacedHelpers } from "vuex";

const { mapState, mapMutations } = createNamespacedHelpers("editor");

import lcd_engine from "@/lcd.engine.js";

const { sider } = lcd_engine;

export default {
  props: {
    id: {
      type: String,
      default: ''
    },
    prop: {
      type: Object,
      default: () => ({})
    },
    global: {
      type: Array,
      default: () => ([])
    }
  },
  data() {
    return {
      sider
    };
  },
  computed: {
    ...mapState([
      'status',
      'layout',
      'getComponentList',
      'variable',
      'graph'
    ]),
  },
  methods: {
    ...mapMutations([
      'handleLayout',
      'handleVariable',
      'handleGraph'
    ]),
  },
};